
<link rel="stylesheet" type="text/css" href="css/home.css">    
 <script src="js/main.js" type="text/javascript"></script>       
 <script src="js/home.js" type="text/javascript"></script>       

 
<div class="widget">
    <div class="wHeader">
        <div class="headerText"><?php getLangText("User Profile") ?></div>
        <div class="headerSwitch"><?php echo getLangText("Expand/Collapse")?></div>
    </div>
    <div class="wContent">
 
         <table>
            <tbody>
                <tr><th ><label for="uName"><?php echo getlangText("Name")?>&nbsp;</label></th>
                    <td >
                        <input type="text" id="uName" size="50" value="<?php echo $user->name;?>"/>
                        <span class="errorMsg" ><?php getLangText("Please enter your name")?></span>
                    </td>
                </tr>
                <tr><th ><label for="uDesignation"><?php echo getlangText("Designation")?>&nbsp;</label></th>
                    <td >
                        <input type="text" id="uDesignation" size="50" value="<?php echo $user->designation;?>"/>
                    </td>
                </tr>
                <tr><th ><label for="uEmail"><?php echo getlangText("Email")?>&nbsp;</label></th>
                    <td >
                        <input type="text" id="uEmail" size="50" value="<?php echo $user->email;?>"/>
                        <span class="errorMsg" ><?php getLangText("Invalid email address")?></span>
                    </td>
                </tr>
                <tr><th ><label for="uMobilePhone"><?php echo getlangText("Mobile Phone No.")?>&nbsp;</label></th>
                    <td >
                        <input type="text" id="uMobilePhone" size="20" value="<?php echo $user->mobilephone;?>"/>
                        <span class="errorMsg" ><?php getLangText("Invalid mobile phone number")?></span>
                    </td>
                </tr>
                <tr><th ><label for="uLang"><?php echo getlangText("Prefer Language")?>&nbsp;</label></th>
                    <td >
                        <select id="uLang" name="uLang">
                          <option <?php if ($user->lang==1) echo 'selected="selected"'; ?> >Bahasa Malaysia</option>
                          <option <?php if ($user->lang==2) echo 'selected="selected"'; ?> >English</option>
                        </select>                        
                    </td>
                </tr>
                <tr><th ><label for="Department"><?php echo getlangText("Department")?>&nbsp;</label></th>
                    <td >
                    <?php 
                         $this->load->view('v_lib',Array('container'=>$departments,
                            'option_id'=>'Department',
                            'caption'=>'Department',
                            'fieldname'=>'depart_name'));                        
                    ?>                                                                
                    </td>
                </tr>
            </tbody>
         </table>    

    <div class="wFooter">
            <div id="saveProfile" class="saveChange" onclick="saveProfile();"><?php getLangText("Save Changes");?><span class="errorMsg" ></span></div>  
        </div>
    </div>
</div>

<div class="widget">
    <div class="wHeader">
        <div class="headerText"><?php getLangText("Change Password") ?></div>
        <div class="headerSwitch"><?php echo getLangText("Expand/Collapse")?></div>
    </div>
    <div class="wContent">
        <div class="cpw">
            <table>
                <tbody>
                    <tr><th ><label for="password_old">Current&nbsp;</label></th>
                        <td ><input type="password" id="password_old" name="password_old"><dd></dd><span style="display:none"><?php getLangText("Please enter current password")?></span></td>
                    </tr>
                    <tr><th ></th>
                        <td ><div>&nbsp;</div></td>
                    </tr>
                    <tr ><th ><label for="password_new">New&nbsp;</label></th>
                        <td ><input type="password" autocomplete="off" id="password_new" name="password_new" >
                            <span class="errorMsg"><?php getLangText("Please enter new password")?></span>
                            <span id="psw2Short"style="display:none"><?php getLangText("Password too short")?></span>
                        </td>
                    </tr>
                    <tr><th ></th>
                        <td ><div id="password_new_status">&nbsp;</div></td>
                    </tr>
                    <tr ><th ><label for="password_confirm">Re-type new&nbsp;</label></th>
                        <td ><input type="password" autocomplete="off" id="password_confirm" name="password_confirm" ><span class="errorMsg"><?php getLangText("Passwords do not match")?></span></</td>
                    </tr>
                    <tr><th ></th>
                        <td ><div id="password_confirm_status">&nbsp;</div></td>
                    </tr>
                </tbody>
                </table>
        </div>
        <div class="wFooter">
            <div class="saveChange" onclick="changePsw();"><?php getLangText("Save Changes");?></div>
        </div>
    </div>
</div>

<br/>
   
